#!/bin/bash

sudo bke reset
sudo bke init --runtime docker --confirm true

# 判断当前用户是否为root
if [ $(id -u) != "0" ]; then
  # 获取home目录
  home=$(eval echo ~${SUDO_USER})
  sudo cp /etc/rancher/k3s/k3s.yaml $home/.kube/config
fi
